Lens shading correction is used to account for variation among gain across different pixels of a photodetector in the production of a digital image through image signal processing. Lens shading correction factors are represented with a correction gain profile from a standard light source for a lens and photodetector, or series of lens-photodetector assemblies manufactured under the same design and processes. In some implementations, the lens shading correction factors are stored as a look-up table with one value associated with each pixel of a photodetector. Generally, photodetectors include separate red, green, and blue pixel sensors, and the look-up table includes individual correction factors for each of the separate red, green, and blue pixel sensors.
In some implementations, the lens shading correction values are stored for only some of the pixels, and the correction factor for a given pixel are interpolated (such as bilinear interpolation) from the stored correction factors. This reduces the amount of data required for correction factors. Generally such stored correction factors are provided for multiple channels, such as R/G/G/B (a channel for a red sensor, two channels for two green sensors, and a channel for a blue sensor).
In one particular implementation, a grid of 17×17 sectors, each representing a sample area, with 4 channels, such as red, green, green, blue (R/G/G/B) for sensor raw data, are used. Such an example requires about 11560 bits, typically stored in static random access memory (SRAM), as each sample uses about 10 bits. In various implementations, more samples reduce error in the interpolated correction factors, whereas less samples reduce the data storage required.
In implementations with larger numbers of sectors, the precision of lens shading correction factors associated with pixels of a captured image is improved; however, increasing the number of sectors increases the memory requirements for lens shading correction. Techniques for improving the precision of lens shading correction factors with reduced memory requirements, while also limiting the need for other system resources, could potentially improve image quality and/or reduce system hardware and energy requirements for lens shading correction.